Skip to content

The Web leg of examples/portable is a boundary, and the linker says where it is - #30

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/the-web-leg-is-a-boundary
Sep 11, 2026
Merged

The Web leg of examples/portable is a boundary, and the linker says where it is#30
Sunrisepeak merged 1 commit into
mainfrom
fix/the-web-leg-is-a-boundary

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

The Web leg of examples/portable is a boundary, and the linker says where it is

openkal-emscripten 0.1.0 is in the index, so the Web line now resolves. It
does not build, and that is the mechanism rather than a gap.

Measured, with the dependency resolved and every translation unit compiled:

wasm-ld: error: obj/main.o: undefined symbol: kal_process_spawn
wasm-ld: error: obj/main.o: undefined symbol: kal_process_wait
wasm-ld: error: obj/main.o: undefined symbol: kal_process_close
wasm-ld: error: obj/main.o: undefined symbol: kal_task_start
wasm-ld: error: obj/main.o: undefined symbol: kal_task_join
wasm-ld: error: obj/main.o: undefined symbol: kal_task_wait
wasm-ld: error: obj/main.o: undefined symbol: kal_task_wake

Seven names, each one this program uses and this platform does not have. There
is no fork, no exec and no second address space under Emscripten, so
openkal.process, openkal.exec and openkal.space are absent from that
implementation -- and this program uses two of the three.

THE CRITERION WAS WRONG AND THE MEASUREMENT IS WHAT SAID SO. The design record
asked for this example to build "for all five platforms it names". It cannot,
and neither way of making it could is acceptable: #ifdef-ing the one file in
this ecosystem that exists to contain no platform awareness, or having
openkal-emscripten provide operations it cannot perform, which is the shape
clause 6.2 forbids -- present and always failing, which the caller cannot tell
from a condition.

So the line stays and the example is better for it. A program about
portability that also shows where portability stops is worth more than one that
stops at four platforms and says nothing about the fifth. The README and the
manifest carry the linker's own output as the evidence, and note that
openkal.task is a second question with the same answer here: the four
kal_task_* names resolve under that implementation's threads feature, and
the three kal_process_* names never will.

The other three legs are measured and unchanged: host 0 observations that did not hold, and both Android ABIs build over openkal-linux unchanged.

Sunrisepeak pushed a commit to mcpp-community/mcpp that referenced this pull request Sep 11, 2026
…and the measurement said so

The design record asked for that example to build for all five platforms it
names. The fifth has twelve of the fifteen interfaces and the program uses two
of the three absent ones, so the link names seven symbols:
kal_process_{spawn,wait,close} and kal_task_{start,join,wait,wake}.

Neither way of making it build is acceptable -- #ifdef-ing the one file in this
ecosystem that exists to contain no platform awareness, or having
openkal-emscripten provide operations it cannot perform, which is the shape
clause 6.2 forbids. So the criterion was wrong and the example is better for
it: it demonstrates the boundary, with the linker's own output as the reading.

mcpplibs/openkal#30 carries the example's own correction.
…here it is

`openkal-emscripten 0.1.0` is in the index, so the Web line now resolves. It
does not build, and that is the mechanism rather than a gap.

Measured, with the dependency resolved and every translation unit compiled:

  wasm-ld: error: obj/main.o: undefined symbol: kal_process_spawn
  wasm-ld: error: obj/main.o: undefined symbol: kal_process_wait
  wasm-ld: error: obj/main.o: undefined symbol: kal_process_close
  wasm-ld: error: obj/main.o: undefined symbol: kal_task_start
  wasm-ld: error: obj/main.o: undefined symbol: kal_task_join
  wasm-ld: error: obj/main.o: undefined symbol: kal_task_wait
  wasm-ld: error: obj/main.o: undefined symbol: kal_task_wake

Seven names, each one this program uses and this platform does not have. There
is no fork, no exec and no second address space under Emscripten, so
`openkal.process`, `openkal.exec` and `openkal.space` are absent from that
implementation -- and this program uses two of the three.

THE CRITERION WAS WRONG AND THE MEASUREMENT IS WHAT SAID SO. The design record
asked for this example to build "for all five platforms it names". It cannot,
and neither way of making it could is acceptable: `#ifdef`-ing the one file in
this ecosystem that exists to contain no platform awareness, or having
`openkal-emscripten` provide operations it cannot perform, which is the shape
clause 6.2 forbids -- present and always failing, which the caller cannot tell
from a condition.

So the line stays and the example is better for it. A program about
portability that also shows where portability stops is worth more than one that
stops at four platforms and says nothing about the fifth. The README and the
manifest carry the linker's own output as the evidence, and note that
`openkal.task` is a second question with the same answer here: the four
`kal_task_*` names resolve under that implementation's `threads` feature, and
the three `kal_process_*` names never will.

The other three legs are measured and unchanged: host `0 observations that did
not hold`, and both Android ABIs build over `openkal-linux` unchanged.
@Sunrisepeak
Sunrisepeak force-pushed the fix/the-web-leg-is-a-boundary branch from 18ba1ad to eb0962c Compare September 11, 2026 13:24
@Sunrisepeak
Sunrisepeak merged commit 40b2337 into main Sep 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants